import errorHandler from 'errorhandler'
import app from './app'
import { check, validationResult } from 'express-validator'
import { Request, Response } from 'express'

if (process.env.NODE_ENV === 'development') {
  app.use(errorHandler())
}


app.listen(app.get('port'), () => {
  console.log(
    'App is running at http://localhost:%d in %s mode', app.get('port'), app.get('env')
  )
})

// export default server